package com.bluesky.jwf.example1.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Function implements Serializable{
	private String name;
	private String url;
	
	private boolean disable;

	private Function parent;
	private List<Function> children = new ArrayList<Function>();

	public Function(String name, String url) {
		this.name = name;
		this.url = url;
	}

	public void addChild(Function child) {
		children.add(child);
		child.setParent(this);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Function getParent() {
		return parent;
	}

	public void setParent(Function parent) {
		this.parent = parent;
	}

	public List<Function> getChildren() {
		return children;
	}

	public void setChildren(List<Function> children) {
		this.children = children;
	}

	public boolean isDisable() {
		return disable;
	}

	public void setDisable(boolean disable) {
		this.disable = disable;
	}

}
